package com.apes.auto.maintain.model;

import com.apes.framework.jpa.ApesBean;
import com.apes.framework.jpa.DefaultPersistListener;
import com.apes.framework.jpa.comment.Comment;
import com.apes.framework.jpa.generator.ApesGenerator;
import lombok.Getter;
import lombok.Setter;
import org.hibernate.annotations.DynamicInsert;
import org.hibernate.annotations.DynamicUpdate;
import org.hibernate.annotations.SelectBeforeUpdate;

import javax.persistence.*;

/**
 * @ClassName MaintainPeriodRange
 * @Description 保养周期范围区间
 * @Author pengyb
 * @Date 2019/8/8 17:25
 * @Version 1.0
 **/
@Getter
@Setter
@SelectBeforeUpdate
@DynamicInsert
@DynamicUpdate
@Entity
@EntityListeners(DefaultPersistListener.class)
@Table(name = MaintainPeriodRange.CONST_TABLE_NAME)
public class MaintainPeriodRange implements ApesBean {
    public static final String CONST_TABLE_NAME = "byzq_range";

    @Id
    @Column(name = "id", length = 32)
    @ApesGenerator(code = CONST_TABLE_NAME, name = "保养周期范围区间")
    private String id;

    @Column(name = "XM", length = 36)
    @Comment("项目")
    private String XM;

    @Column(name = "ZXZ", length = 20)
    @Comment("最小值")
    private int ZXZ;

    @Column(name = "ZDZ", length = 20)
    @Comment("最大值")
    private int ZDZ;

    @Column(name = "ZHI", length = 64)
    @Comment("值")
    private String ZHI;

    @Column(name = "BL", columnDefinition = "number(10,2)")
    @Comment("比率")
    private int BL;

    @Column(name = "GLS", length = 11)
    @Comment("公里数")
    private int GLS;

    @Column(name = "SJ", length = 11)
    @Comment("时间")
    private int SJ;

}
